import { AppLayoutIndex } from "@/routers/constants";
import { RouteObject } from "../../types/router";
import React from "react";
import lazyLoad from "@/routers/components/LazyLoad";
import { Navigate } from "react-router-dom";
// 首页模块
const CompanyRouter: Array<RouteObject> = [
	{
		path: "/app/company",
		element: <AppLayoutIndex />,
		children: [
			{
				path: "/app/company/overview",
				component: () => import("@/pages/app/company/overview"),
				meta: {
					requiresAuth: false,
					title: "公司概览",
					key: "companyOverView"
				}
			},
			{
				path: "/app/company/companyInfo",
				component: () => import("@/pages/app/company/companyInfo"),
				meta: {
					requiresAuth: false,
					title: "公司信息",
					key: "companyInfo"
				}
			},
			{
				path: "/app/company/org",
				component: () => import("@/pages/app/company/org/org"),
				meta: {
					isPageLayout: true,
					requiresAuth: false,
					title: "组织架构",
					isTitle: false,
					key: "org"
				}
			},
			{
				path: "/app/company/org/user",
				component: () => import("@/pages/app/company/org/user"),
				meta: {
					requiresAuth: false,
					title: "人员管理",
					isTitle: true,
					key: "user"
				}
			},
			{
				path: "/app/company",
				redirect: "/app/company/overview"
			}
		]
	}
];

export default CompanyRouter;
